import React from 'react'
import Favorite from "/src/compoents/commont/Favorite";
import LazyLoadImage from "../../../../utils/Lazy";
import style from "./createtab1.module.css";
import redxin from "/src/assets/logo/logo1.png";
// import cuo from "src/assets/logo/logo11.png";
import ai from "/src/assets/logo/logo2.png";
import { favoriterimg, favoriterimg2 } from "../../../../compoents/Libs";
function CreateTab1() {
  const handleError = (e: any) => {
    e.currentTarget.src = 'https://ts1.cn.mm.bing.net/th/id/R-C.68436686378f877196395fd9ef9b1550?rik=O%2fHsvdAkkiWtXA&riu=http%3a%2f%2fpic.616pic.com%2fys_img%2f00%2f58%2f10%2f5lreEdjtgA.jpg&ehk=0bzs3ur7UkrixDJ8e%2bJO82LAgti%2b6ISuUuSzV5sFMe4%3d&risl=&pid=ImgRaw&r=0&sres=1&sresct=1'; // 使用外部链接进行测试
  };
  return (
    <div className={style.box}>
      <div>
        <h3>
          {/* 裂图处理 */}
          <img
            src={redxin}
            onError={handleError}
            style={{ width: '20px', height: '20px' }}
            alt="Logo"
          />
          <LazyLoadImage
            width={20}  //裂图尺寸
            height={20}   //裂图尺寸
            src={redxin} alt='logo' fallbackSrc='https://ts1.cn.mm.bing.net/th/id/R-C.68436686378f877196395fd9ef9b1550?rik=O%2fHsvdAkkiWtXA&riu=http%3a%2f%2fpic.616pic.com%2fys_img%2f00%2f58%2f10%2f5lreEdjtgA.jpg&ehk=0bzs3ur7UkrixDJ8e%2bJO82LAgti%2b6ISuUuSzV5sFMe4%3d&risl=&pid=ImgRaw&r=0&sres=1&sresct=1' style={{ width: '20px', height: '20px' }}></LazyLoadImage>
          收藏场景
          <div className={style.more}>更多</div>
        </h3>
        <Favorite favoriterimg={favoriterimg}></Favorite>
      </div>
      <div>
        <h3><img src={ai} alt="" style={{ width: '20px', height: '20px' }} />智能设计
          <div className={style.more}>更多</div>
        </h3>
        <Favorite favoriterimg={favoriterimg2}></Favorite>
      </div>
      <div>
        <h3><img src={ai} alt="" style={{ width: '20px', height: '20px' }} />公众号
          <div className={style.more}>更多</div>
        </h3>
        <Favorite favoriterimg={favoriterimg2}></Favorite>
      </div>
    </div>
  )
}

export default CreateTab1
